package com.yc.supermarket.mapper;

import com.yc.supermarket.entity.Commodity;
import com.yc.supermarket.entity.ShoppingCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShoppingInfoMapper {
       public int addToCart(ShoppingCart shoppingCart);
       // 根据用户ID和商品ID查询购物车记录
       ShoppingCart queryShoppingCart(@Param("userId") int userId, @Param("productId") int productId);

       // 向购物车插入新记录
       public int insertShoppingCart(ShoppingCart shoppingCart);

       //添加多件商品
       public int insertShoppingCart1(ShoppingCart shoppingCart);
       // 更新购物车记录的数量
       public int updateShoppingCart(ShoppingCart shoppingCart);

}
